package com.ibeeking.found.common.enums;

public enum SerialNumberTypeEnum {
    /***
     * 合同编号keyCode
     */
    CONTRACT_NO("CONTRACT_NO", "合同编号"),
    /***
     * 会员卡号keyCode
     */
    MEMBER_CARD_NO("MEMBER_CARD_NO", "会员卡号"),
    /***
     * 订单号keyCode
     */
    ORDER_NO("ORDER_NO", "订单编号"),
    /***
     * 库存入库单号keyCode
     */
    INVENTORY_INSTOCK_NO("INVENTORY_INSTOCK_NO", "库存入库单编号"),
    /***
     * 库存出库单号keyCode
     */
    INVENTORY_OUTSTOCK_NO("INVENTORY_OUTSTOCK_NO", "库存出库单编号"),
    /***
     * 库存盘点单编号keyCode
     */
    INVENTORY_CHECK_NO("INVENTORY_CHECK_NO", "库存盘点单编号"),
    ;

    private String keyCode;

    private String desc;

    SerialNumberTypeEnum(String keyCode, String desc) {
        this.keyCode = keyCode;
        this.desc = desc;
    }
    public String getKeyCode() {
        return this.keyCode;
    }

    public String getDesc() {
        return this.desc;
    }

    public static String getDescByCode(Integer code) {
        for (SerialNumberTypeEnum enumObj : values()) {
            if (enumObj.getKeyCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
